package com.steven.springcloud2orderservicefeign.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Set;

/**
 * @author CXQ
 * @version 1.0
 */
@FeignClient(name = "product-service")
public interface ProductFeign {

    /**
     * 查询全部商品
     * @return 返回全部商品
     */
    @RequestMapping("api/v1/product/select-all")
    Set<String> selectAll();

    /**
     * 根据主键查询商品信息
     * @param id 主键
     * @return 对应主键的商品信息
     */
    @RequestMapping("api/v1/product/select-by-id")
    String selectById(@RequestParam("id") int id);


}
